import request from '../utils/request';
import { mockAPI, tagListMaps, appList } from '@/mock/appMock'; 
// let baseURL = 'http://192.168.20.35:8866';
let baseURL = '';
export function getTagList(data={}){
    console.log(data);
    return mockAPI(tagListMaps[data.type]);
}

export function getAPPList(data={}){
    return mockAPI(appList);
    // return request.get('/equipment/api/meter/getMeter', { data, baseURL, noprefix:true }).catch(err=>console.log(err)); 
}

// export function getMachTypes(data={}){
//     return request.get('/equipment/api/meter/getMeterType', { data, baseURL, noprefix:true }).catch(err=>console.log(err)); 
// }

// export function getModelList(data={}){
//     return request.get('/equipment/api/meter/getMeterModelList', { data, baseURL, noprefix:true }).catch(err=>console.log(err)); 
// }

// export function addMach(data = {}){
//     return request.post('/equipment/api/meter/addMeter', { data }, { noprefix:true }).catch(err=>console.log(err));
// }

// export function updateMach(data = {}){
//     return request.put('/equipment/api/meter/updateMeter', { data, baseURL }, { noprefix:true }).catch(err=>console.log(err)); 
// }

// export function delMach(data = {}){
//     return request.delete('/equipment/api/meter/deleteMeter', { data, noprefix:true, transformToJson:true }).catch(err=>console.log(err));
// }

// export function getMachParams(data={}){
//     return request.get('/equipment/api/meter/getMetrics', { data, baseURL, noprefix:true }).catch(err=>console.log(err)); 
// }
